import 'package:flutter/material.dart';
import 'package:flutter_shop_z/pages/category_page/LeftCategoryNav.dart';
import 'package:flutter_shop_z/pages/category_page/bottomCommodity.dart';
import 'package:flutter_shop_z/pages/category_page/rightCategoryNav.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_shop_z/pages/category_page/bloc/category_bloc.dart';
import 'package:flutter_shop_z/pages/category_page/bloc/category_sub_bloc.dart';

class CategoryPage extends StatefulWidget {
  int categoryIndex = 0;
  CategoryPage(this.categoryIndex);
  _CategoryPageState createState() => _CategoryPageState(this.categoryIndex);
}

class _CategoryPageState extends State<CategoryPage> {
  int categoryIndex = 0;
  _CategoryPageState(this.categoryIndex);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("商品分类"),
        backgroundColor: Colors.purple,
      ),
      body: Container(
        child: Row(
          children: <Widget>[
            LeftCategoryNav(categoryIndex),
            Column(
              children: <Widget>[
                RightCategoryNav(),
                BottomCommodity(),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
